package com.ss.android.article.base.feature.detail2.widget;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.Animatable;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bytedance.common.utility.UIUtils;
import com.facebook.drawee.controller.BaseControllerListener;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.generic.RoundingParams;
import com.squareup.picasso.Request;
import com.ss.android.account.e.AccountAnimatorHelper;
import com.ss.android.account.e.MuteQuickClickListener;
import com.ss.android.article.base.app.AppData;
import com.ss.android.article.base.app.setting.AbSettings;
import com.ss.android.article.base.ui.SafetyEditText;
import com.ss.android.article.browser.R;
import com.ss.android.article.common.NightModeAsyncImageView;
import com.ss.android.common.ui.view.AlphaImageView;
import com.ss.android.common.util.ToolUtils;
import com.ss.android.image.Image;
import com.ss.android.image.a.a.TTDraweeControllerBuilder;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.ref.WeakReference;

public class DetailTitleBar extends RelativeLayout {

    private static final Interpolator H = new DecelerateInterpolator();
    public TextView mTopMoreTitleTv;
    public View mPgcLayout;
    public boolean g;
    public View h;
    public WeakReference i;
    public Runnable j;
    ImageView mCloseAllWebpageIv;
    OnChildViewClickCallback onChildViewClickCallback;
    OnUserAvatarClickListener onUserAvatarClickListener;
    OnFollowQuestionListener onFollowQuestionListener;
    boolean k;
    private TextView mShareBtn;
    private NightModeAsyncImageView mImgPgcAvatarIv;
    private TextView mTxtPgcNameTv;
    private ImageView mSearchIconIv;
    private String E;
    private NightModeAsyncImageView mTitleBarMidAdIv;
    private MuteQuickClickListener onClickListener;
    private Context mContext;
    private TextView mBackTv;
    private TextView mQuestionFollowBtn;
    private NightModeAsyncImageView mOriginAuthorAvatarIv;
    private ImageView mUserVerifiedIconIv;
    private TextView mPictureRecommendTitle;
    private View mTitleBarDivider;
    private SafetyEditText mAddressEditEt;
    private View mInfoTitleBar;
    private TextView mInfoBackTv;
    private TextView mInfoTitleTv;
    private ImageView mWendaLogoIv;
    private AlphaImageView mWechatShareIv;
    private AlphaImageView mMomentShareIv;
    private AlphaImageView mQQShareIv;

    public DetailTitleBar(Context context) {
        this(context, null);
    }

    public DetailTitleBar(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public DetailTitleBar(Context context, AttributeSet attributeSet, int defaultStyle) {
        super(context, attributeSet, defaultStyle);
        this.E = "";
        this.g = false;
        this.j = new Runnable() {
            public final void run() {
                int v1 = 1;
                int v0 = DetailTitleBar.this.i != null ? 1 : 0;
                if (DetailTitleBar.this.i.get() == null) {
                    v1 = 0;
                }
                if ((v0 & v1) != 0) {
                    ((PopupWindow) DetailTitleBar.this.i.get()).dismiss();
                    DetailTitleBar.this.i.clear();
                }
            }
        };
        this.onClickListener = new MuteQuickClickListener() {

            public final void doOnClick(View view) {
                int id = view.getId();
                if (id == R.id.back) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onBackClick();
                    }
                } else if (id == R.id.top_more_title) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onTopMoreTitleClick();
                    }
                } else if (id == R.id.original_author_avatar) {
                    if (DetailTitleBar.this.onUserAvatarClickListener != null) {
                        DetailTitleBar.this.onUserAvatarClickListener.onUserAvatarClick();
                    }
                } else if (id == R.id.close_all_webpage) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onCloseAllWebPageClick();
                    }
                } else if (id == R.id.iv_share_wechat) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onWechatShareClick();
                    }
                } else if (id == R.id.iv_share_moment) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onMomentShareClick();
                    }
                } else if (id == R.id.address_edit) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onAddressEditClicked(view);
                    }
                } else if (id == R.id.info_back) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onInfoBackClick();
                    }
                } else if (id == R.id.iv_share_qq) {
                    if (DetailTitleBar.this.onChildViewClickCallback != null) {
                        DetailTitleBar.this.onChildViewClickCallback.onQQShareClick();
                    }
                } else if (id == R.id.question_follow_btn
                        && DetailTitleBar.this.onFollowQuestionListener != null) {
                    DetailTitleBar.this.onFollowQuestionListener.onFollowQuestionBtnClick(view);
                }
            }
        };
        DetailTitleBar.inflate(this.getContext(), R.layout.new_detail_title_bar, ((ViewGroup) this));
        this.mContext = this.getContext();
        this.mBackTv = this.findViewById(com.ss.android.article.browser.R.id.back);
        this.mBackTv.setOnClickListener(this.onClickListener);
        UIUtils.setVisibility(this.mBackTv, 8);
        this.mTopMoreTitleTv = this.findViewById(com.ss.android.article.browser.R.id.top_more_title);
        this.mTopMoreTitleTv.setOnClickListener(this.onClickListener);
        this.mQuestionFollowBtn = this.findViewById(com.ss.android.article.browser.R.id.question_follow_btn);
        this.mQuestionFollowBtn.setOnClickListener(this.onClickListener);
        this.mOriginAuthorAvatarIv = this.findViewById(com.ss.android.article.browser.R.id.original_author_avatar);
        this.mOriginAuthorAvatarIv.setOnClickListener(this.onClickListener);
        this.mTitleBarDivider = this.findViewById(com.ss.android.article.browser.R.id.title_bar_divider);
        this.mCloseAllWebpageIv = this.findViewById(com.ss.android.article.browser.R.id.close_all_webpage);
        this.mCloseAllWebpageIv.setOnClickListener(this.onClickListener);
        this.mAddressEditEt = this.findViewById(com.ss.android.article.browser.R.id.address_edit);
        this.mAddressEditEt.setOnClickListener(this.onClickListener);
        this.mInfoTitleBar = this.findViewById(com.ss.android.article.browser.R.id.info_title_bar);
        this.mInfoTitleTv = this.mInfoTitleBar.findViewById(com.ss.android.article.browser.R.id.info_title);
        this.mInfoBackTv = this.mInfoTitleBar.findViewById(com.ss.android.article.browser.R.id.info_back);
        this.mInfoBackTv.setOnClickListener(this.onClickListener);
        this.mWendaLogoIv = this.findViewById(com.ss.android.article.browser.R.id.wenda_logo);
        this.mWechatShareIv = this.findViewById(com.ss.android.article.browser.R.id.iv_share_wechat);
        this.mWechatShareIv.setOnClickListener(this.onClickListener);
        this.mMomentShareIv = this.findViewById(com.ss.android.article.browser.R.id.iv_share_moment);
        this.mMomentShareIv.setOnClickListener(this.onClickListener);
        this.mQQShareIv = this.findViewById(com.ss.android.article.browser.R.id.iv_share_qq);
        this.mQQShareIv.setOnClickListener(this.onClickListener);
        this.mShareBtn = this.findViewById(com.ss.android.article.browser.R.id.btn_share);
        this.mPgcLayout = this.findViewById(com.ss.android.article.browser.R.id.pgc_layout);
        this.mImgPgcAvatarIv = this.findViewById(com.ss.android.article.browser.R.id.img_pgc_avatar);
        this.mUserVerifiedIconIv = this.findViewById(com.ss.android.article.browser.R.id.user_verified_icon);
        this.mTxtPgcNameTv = this.findViewById(com.ss.android.article.browser.R.id.txt_pgc_name);
        this.mSearchIconIv = this.findViewById(com.ss.android.article.browser.R.id.search_icon);
        this.mTitleBarMidAdIv = this.findViewById(com.ss.android.article.browser.R.id.title_bar_mid_ad);
        this.init();
    }

    @SuppressLint("ResourceType")
    public final void init() {
        AppData.getInstance();
        boolean isNightMode = AppData.isNightMode();
        this.mBackTv.setCompoundDrawablesWithIntrinsicBounds(com.ss.android.article.browser.R.drawable.btn_back, 0, 0, 0);
        this.mTopMoreTitleTv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.c_, 0);
        this.mTitleBarDivider.setBackgroundResource(com.ss.android.article.browser.R.color.d);
        this.setBackgroundResource(com.ss.android.article.browser.R.drawable.detail_bg_titlebar);
        this.mInfoTitleTv.setTextColor(this.getContext().getResources().getColor(com.ss.android.article.browser.R.color.detail_title_bar_url));
        this.mInfoBackTv.setTextColor(this.getContext().getResources().getColorStateList(com.ss.android.article.browser.R.drawable.btn_detail_title_bar_back));
        this.mInfoTitleBar.setBackgroundResource(com.ss.android.article.browser.R.drawable.detail_bg_titlebar);
        this.mUserVerifiedIconIv.setImageResource(com.ss.android.article.browser.R.drawable.icon_vip);
        this.mTxtPgcNameTv.setTextColor(this.getResources().getColor(com.ss.android.article.browser.R.color.ssxinzi1));
        this.mImgPgcAvatarIv.adaptNightMode(isNightMode);
        this.mTitleBarMidAdIv.adaptNightMode(isNightMode);
        RoundingParams roundingParams = ((GenericDraweeHierarchy) this.mImgPgcAvatarIv.getHierarchy()).mRoundingParams;
        roundingParams.setBorder(this.getResources().getColor(com.ss.android.article.browser.R.color.ssxinxian1) & 16777215 | -2147483648, TypedValue.applyDimension(1, 1f, this.getResources().getDisplayMetrics()));
        ((GenericDraweeHierarchy) this.mImgPgcAvatarIv.getHierarchy()).setRoundingParams(roundingParams);
        this.mSearchIconIv.setImageResource(com.ss.android.article.browser.R.drawable.search_topic);
        this.mQuestionFollowBtn.setTextColor(this.getResources().getColorStateList(com.ss.android.article.browser.R.color.follow_question_text_color));
        this.mQuestionFollowBtn.setBackgroundDrawable(this.getResources().getDrawable(com.ss.android.article.browser.R.drawable.follow_question_bg));
        this.mWendaLogoIv.setImageResource(com.ss.android.article.browser.R.drawable.fa);
    }

    public final void setUserVerifiedIconVisible(boolean visible) {
        int visibility = visible ? 0 : 8;
        UIUtils.setVisibility(mUserVerifiedIconIv, visibility);
    }

    public final void b() {
        AbSettings abSettings = AppData.getInstance().getAbSettings();
        UIUtils.setVisibility(this.mTopMoreTitleTv, View.GONE);
        if (abSettings.isNormalShare()) {
            UIUtils.setVisibility(this.mWechatShareIv, View.GONE);
            UIUtils.setVisibility(this.mMomentShareIv, View.GONE);
            UIUtils.setVisibility(this.mInfoTitleTv, 0);
        } else if (abSettings.isTopShare()) {
            UIUtils.setVisibility(this.mWechatShareIv, 0);
            UIUtils.setVisibility(this.mMomentShareIv, 0);
            UIUtils.setVisibility(this.mTopMoreTitleTv, 0);
            UIUtils.setVisibility(this.mInfoTitleTv, View.GONE);
            UIUtils.setVisibility(this.mTxtPgcNameTv, View.GONE);
            UIUtils.setVisibility(this.mImgPgcAvatarIv, View.GONE);
        } else if (abSettings.isBottomShare()) {
            UIUtils.setVisibility(this.mWechatShareIv, View.GONE);
            UIUtils.setVisibility(this.mMomentShareIv, View.GONE);
            UIUtils.setVisibility(this.mInfoTitleTv, View.GONE);
            UIUtils.setVisibility(this.mTopMoreTitleTv, 0);
            UIUtils.setVisibility(this.mTxtPgcNameTv, 0);
            UIUtils.setVisibility(this.mImgPgcAvatarIv, 0);
        } else if (abSettings.isQQTopShare()) {
            UIUtils.setVisibility(this.mWechatShareIv, 0);
            UIUtils.setVisibility(this.mMomentShareIv, 0);
            UIUtils.setVisibility(this.mTopMoreTitleTv, View.GONE);
            UIUtils.setVisibility(this.mInfoTitleTv, View.GONE);
            UIUtils.setVisibility(this.mShareBtn, 0);
            UIUtils.setVisibility(this.mTxtPgcNameTv, View.GONE);
            UIUtils.setVisibility(this.mImgPgcAvatarIv, View.GONE);
            if (ToolUtils.isAppInstalled(this.mContext, "com.tencent.mobileqq")) {
                UIUtils.setVisibility(this.mQQShareIv, 0);
                ((RelativeLayout.LayoutParams) this.mMomentShareIv.getLayoutParams()).addRule(0, R.id.iv_share_qq);
            } else {
                ((RelativeLayout.LayoutParams) this.mMomentShareIv.getLayoutParams()).addRule(11);
            }
        }
    }

    public final void showCloseAllWebpageIv() {
        if (this.mCloseAllWebpageIv != null && this.mCloseAllWebpageIv.getVisibility() != View.VISIBLE) {
            this.mCloseAllWebpageIv.postDelayed(new Runnable() {
                public final void run() {
                    DetailTitleBar.this.mCloseAllWebpageIv.setVisibility(View.VISIBLE);
                }
            }, 300L);
        }
    }

    public final void d() {
        AccountAnimatorHelper.clearAnimation(this.mPgcLayout);
        AnimatorSet animatorSet = new AnimatorSet();
        Animator v1 = AccountAnimatorHelper.createTranslationYAnimation(this.mPgcLayout, -this.mPgcLayout.getHeight(), 0);
        Animator v2 = AccountAnimatorHelper.createFadeInAnimation(this.mPgcLayout);
        animatorSet.addListener(new AnimatorListenerAdapter() {
            public final void onAnimationStart(Animator animator) {
                DetailTitleBar.this.mPgcLayout.setVisibility(View.VISIBLE);
            }
        });
        animatorSet.playTogether(new Animator[]{v1, v2});
        animatorSet.setDuration(360);
        animatorSet.setInterpolator(DetailTitleBar.H);
        animatorSet.start();
        this.mPgcLayout.setTag(animatorSet);
    }

    public final void e() {
        AccountAnimatorHelper.clearAnimation(this.mPgcLayout);
        AnimatorSet animatorSet = new AnimatorSet();
        Animator v1 = AccountAnimatorHelper.createTranslationYAnimation(this.mPgcLayout, 0, -this.mPgcLayout.getHeight());
        Animator v2 = AccountAnimatorHelper.createFadeOutAnimation(this.mPgcLayout);
        animatorSet.addListener(new AnimatorListenerAdapter() {

            public final void onAnimationEnd(Animator arg3) {
                DetailTitleBar.this.mPgcLayout.setVisibility(View.INVISIBLE);
            }
        });
        animatorSet.playTogether(new Animator[]{v1, v2});
        animatorSet.setDuration(360);
        animatorSet.setInterpolator(DetailTitleBar.H);
        animatorSet.start();
        this.mPgcLayout.setTag(animatorSet);
    }

    public final void f() {
        if (this.i != null) {
            this.i.clear();
        }

        if (this.h != null) {
            this.h.removeCallbacks(this.j);
        }
    }

    public final void g() {
        if (this.g) {
            int v0;
            for (v0 = 0; v0 < this.getChildCount() - 1; ++v0) {
                if (this.getChildAt(v0).getVisibility() == View.VISIBLE) {
                    this.getChildAt(v0).setTranslationX(-UIUtils.dp2px(this.mContext, 15f));
                    this.getChildAt(v0).animate().translationX(0f).setDuration(200).setInterpolator(new DecelerateInterpolator()).start();
                }
            }

            this.g = false;
        }
    }

    private void h() {
        int v0 = AppData.getInstance().getAbSettings().isSwipeBackEnabled() ? R.drawable.picture_detail_back_icon_bg : R.drawable.picture_detail_back_icon_bg_old;
        this.mBackTv.setCompoundDrawablesWithIntrinsicBounds(v0, 0, 0, 0);
        this.mTopMoreTitleTv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.picture_detail_titlebar_more, 0);
        this.mPictureRecommendTitle = this.findViewById(com.ss.android.article.browser.R.id.picture_recommend_title);
        this.mShareBtn.setTextColor(this.getResources().getColor(com.ss.android.article.browser.R.color.wt));
        UIUtils.setVisibility(this.mTitleBarDivider, 8);
    }

    public void setFollowQuestionBtnSeleted(boolean arg4) {
        if (arg4) {
            this.mQuestionFollowBtn.setText(this.mContext.getString(com.ss.android.article.browser.R.string.video_detail_pgc_followed));
            this.mQuestionFollowBtn.setSelected(true);
        } else {
            this.mQuestionFollowBtn.setText(this.mContext.getString(com.ss.android.article.browser.R.string.video_detail_pgc_follow));
            this.mQuestionFollowBtn.setSelected(false);
        }
    }

    public void setFollowQuestionBtnShow(boolean arg3) {
        if (arg3) {
            this.mQuestionFollowBtn.setVisibility(View.VISIBLE);
        } else {
            this.mQuestionFollowBtn.setVisibility(View.GONE);
        }
    }

    public void setInfoTitle(String arg2) {
        this.mInfoTitleTv.setText(((CharSequence) arg2));
    }

    public void setInfoTitleBarVisibility(boolean arg3) {
        View v1 = this.mInfoTitleBar;
        int v0 = arg3 ? 0 : 8;
        UIUtils.setVisibility(v1, v0);
    }

    public void setMoreBtnVisibility(boolean arg3) {
        TextView v1 = this.mTopMoreTitleTv;
        int v0 = arg3 ? 0 : 4;
        UIUtils.setVisibility(((View) v1), v0);
    }

    public void setOnChildViewClickCallback(OnChildViewClickCallback arg1) {
        this.onChildViewClickCallback = arg1;
    }

    public void setOnFollowQuestionListener(OnFollowQuestionListener arg1) {
        this.onFollowQuestionListener = arg1;
    }

    public void setOnUserAvatarClickListener(OnUserAvatarClickListener arg1) {
        this.onUserAvatarClickListener = arg1;
    }

    public void setPgcAvatar(Uri arg3) {
        TTDraweeControllerBuilder builder = android.support.design.a.sTTDraweeControllerBuilderSupplier.get();
        builder.mLowResImageRequest = new Request.Builder().build();
        this.mImgPgcAvatarIv.setController((builder).getThis().setUri(arg3).setOldController(this.mImgPgcAvatarIv.getController()).build());
    }

    public void setPgcClickListener(View.OnClickListener arg2) {
        this.mPgcLayout.setOnClickListener(arg2);
    }

    public void setPgcLayoutVisibility(int arg2) {
        this.mPgcLayout.setVisibility(arg2);
    }

    public void setPgcName(CharSequence arg2) {
        this.mTxtPgcNameTv.setText(arg2);
    }

    public void setPictureTitleText(String arg2) {
        this.mPictureRecommendTitle.setText(((CharSequence) arg2));
    }

    public void setPictureTitleVisibility(boolean arg3) {
        if (arg3) {
            UIUtils.setVisibility(this.mPictureRecommendTitle, 0);
        } else {
            UIUtils.setVisibility(this.mPictureRecommendTitle, 8);
        }
    }

    public void setSearchClickListener(View.OnClickListener searchClickListener) {
        this.mSearchIconIv.setOnClickListener(searchClickListener);
    }

    public void setSearchIconVisibility(int visibility) {
        float v3 = 88f;
        float v2 = 50f;
        UIUtils.setVisibility(this.mSearchIconIv, visibility);
        if (visibility == 0) {
            ((MarginLayoutParams) this.mPgcLayout.getLayoutParams()).leftMargin = ((int) UIUtils.dp2px(this.mContext, v3));
            ((MarginLayoutParams) this.mPgcLayout.getLayoutParams()).rightMargin = ((int) UIUtils.dp2px(this.mContext, v3));
            this.mPgcLayout.requestLayout();
        } else {
            ((MarginLayoutParams) this.mPgcLayout.getLayoutParams()).leftMargin = ((int) UIUtils.dp2px(this.mContext, v2));
            ((MarginLayoutParams) this.mPgcLayout.getLayoutParams()).rightMargin = ((int) UIUtils.dp2px(this.mContext, v2));
            this.mPgcLayout.requestLayout();
        }
    }

    public void setTitleBarStyle(int arg5) {
        int v0 = R.drawable.detail_bg_titlebar;
        int v3 = R.drawable.btn_back;
        int v1 = 8;
        switch (arg5) {
            case 0: {
                this.setBackgroundResource(v0);
                this.mBackTv.setCompoundDrawablesWithIntrinsicBounds(v3, 0, 0, 0);
                this.mTopMoreTitleTv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.c_, 0);
                UIUtils.setVisibility(this.mTitleBarDivider, 0);
                break;
            }
            case 1: {
                this.setBackgroundResource(com.ss.android.article.browser.R.color.trans_half_black);
                this.h();
                break;
            }
            case 2: {
                this.setBackgroundResource(com.ss.android.article.browser.R.color.transparent);
                this.h();
                break;
            }
            case 3: {
                this.setBackgroundResource(v0);
                this.mBackTv.setCompoundDrawablesWithIntrinsicBounds(v3, 0, 0, 0);
                UIUtils.setVisibility(this.mTitleBarDivider, 0);
                UIUtils.setVisibility(this.mCloseAllWebpageIv, v1);
                UIUtils.setVisibility(this.mTopMoreTitleTv, v1);
                UIUtils.setVisibility(this.mPgcLayout, v1);
                UIUtils.setVisibility(this.mOriginAuthorAvatarIv, v1);
                UIUtils.setVisibility(this.mPictureRecommendTitle, v1);
                UIUtils.setVisibility(this.mInfoTitleBar, v1);
                UIUtils.setVisibility(this.mMomentShareIv, v1);
                UIUtils.setVisibility(this.mWechatShareIv, v1);
                UIUtils.setVisibility(this.mQQShareIv, v1);
                UIUtils.setVisibility(this.mShareBtn, v1);
                break;
            }
        }
    }

    public void setUserAvatar(String url) {
        if (!android.support.design.a.isTextEmpty(url)) {
            UIUtils.setVisibility(this.mOriginAuthorAvatarIv, 0);
            boolean isQQTopShare = AppData.getInstance().getAbSettings().isQQTopShare();
            int visibility = isQQTopShare ? View.GONE : View.VISIBLE;
            UIUtils.setVisibility(mTopMoreTitleTv, visibility);
            if ((AppData.getInstance().getAbSettings().isTopShare()) || (isQQTopShare)) {
                UIUtils.setVisibility(this.mOriginAuthorAvatarIv, View.GONE);
                UIUtils.setVisibility(this.mUserVerifiedIconIv, View.GONE);
                UIUtils.setVisibility(this.mTxtPgcNameTv, View.GONE);
                UIUtils.setVisibility(this.mImgPgcAvatarIv, View.GONE);
            }

            if (this.E.equals(url)) {
                return;
            }

            this.E = url;
            Image image = new Image();
            image.url = url;
            image.type = 0;
            this.mOriginAuthorAvatarIv.setController(
                    android.support.design.a.sTTDraweeControllerBuilderSupplier.get()
                            .setControllerListener(new BaseControllerListener() {

                                public final void onFinalImageSet(String id, Object imageInfo, Animatable animatable) {
                                    super.onFinalImageSet(id, imageInfo, animatable);
                                    DetailTitleBar.this.k = true;
                                }
                            })
                            .setUri(Uri.parse(url))
                            .build());
        } else {
            UIUtils.setVisibility(this.mOriginAuthorAvatarIv, View.GONE);
            this.setUserVerifiedIconVisible(false);
        }
    }

    public void setVisibility(int visibility) {
        super.setVisibility(visibility);
    }

    public void setWdlogoShow(boolean visible) {
        int visibility = visible ? View.VISIBLE : View.GONE;
        mWendaLogoIv.setVisibility(visibility);
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface TITLE_BAR_STYLE {
    }

    public interface OnChildViewClickCallback {
        void onBackClick();

        void onTopMoreTitleClick();

        void onCloseAllWebPageClick();

        void onWechatShareClick();

        void onQQShareClick();

        void onMomentShareClick();

        void onInfoBackClick();

        void onAddressEditClicked(View arg1);
    }

    public interface OnFollowQuestionListener {
        void onFollowQuestionBtnClick(View view);
    }

    public interface OnUserAvatarClickListener {
        void onUserAvatarClick();
    }
}

